/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.erickpardal.game.fpsdemo;

import com.jme.util.GameTaskQueueManager;
import com.jmex.editors.swing.settings.GameSettingsPanel;
import com.jmex.game.StandardGame;
import com.jmex.game.state.GameStateManager;
import java.util.concurrent.Callable;

/**
 *
 * @author Erick Pardal
 */
public class FPS {

    public static void main(String args[]) throws Exception {
        StandardGame app = new StandardGame("FPS Demo");
        if (GameSettingsPanel.prompt(app.getSettings())) {
            app.start();
            GameTaskQueueManager.getManager().update(new Callable<Void>() {

                public Void call() throws Exception {
                    IngameState game = new IngameState();
                    GameStateManager.getInstance().attachChild(game);
                    game.setActive(true);
                    return null;
                }
            });
        }
    }
}
